ScanDocument AddLaserPropertyVariable
Create a variable that holds laser parameters using the LaserParameters object. This variable can be used in a ScanScript to dynamically change the laser parameters during marking. Additionally, a saved file containing laser parameter values, formatted in XML or JSON, can be loaded to add a variable.
Overloads
public void AddLaserPropertyVariable(LaserParameters laserParameter) |
public void AddLaserPropertyVariable(string fileName) |
Return value
void |
Parameters
LaserParameters | laserParameter | A configured LaserParameter object with values |
string | fileName | A path to a file name containing laser parameters |
Exceptions
FileNotFoundException | The file specified in path was not found. |
XmlException | Encountered error in XML-parsing operations |
JsonSerializationException | Encountered error during JSON serialization or deserialization |
Example
Copy
scanDocument = scanDeviceManager.CreateScanDocument(GetselectedDeviceUniqueName(), DistanceUnit.Millimeters, false);
LaserParameters lsParam = new LaserParameters(DistanceUnit.Millimeters, AngleUnit.Degrees, TimeUnit.Microseconds);
lsParam.LaserOnDelay = 10;
lsParam.LaserOffDelay = 10;
lsParam.MarkingSpeed = 1000;
lsParam.JumpSpeed = 2000;
lsParam.JumpDelay = 100;
lsParam.MarkDelay = 100;
lsParam.Name = "Recipe1";
scanDocument.AddLaserPropertyVariable(lsParam);